package com.ellricky.market.ui

import android.os.Bundle
import android.view.View
import androidx.fragment.app.Fragment

import com.andr.common.ui.fragment.BaseToolBarFragment
import com.andr.common.ui.mvp.BasePresenter
import com.ellricky.market.R
import kotlinx.android.synthetic.main.market_fragment_clue.*

class MarketActiveManageFragment : BaseToolBarFragment<Void, BasePresenter<Void>>() {

    companion object {
        fun newInstance(): MarketActiveManageFragment {
            val fragment = MarketActiveManageFragment()
            val bundle = Bundle()
            fragment.arguments = bundle
            return fragment
        }
    }

    override fun getContentLayout(): Int {
        return R.layout.market_fragment_active_manage
    }

    override fun initUIView(root: View?) {
        super.initUIView(root)

        mTvTitle.text = getString(R.string.base_active_manage)

        initTab()
    }

    private fun initTab() {
        val frgList = arrayListOf<Fragment>(
            MarketActiveFragment.newInstance("0"),
            MarketActiveFragment.newInstance("1")
        )

        val tList = listOf("我的活动", "活动库")
        tabLayout.setUp(childFragmentManager, frgList, tList, vp)
    }
}